package com.winit.schedule.core.repository.entity;

import java.io.Serializable;

import com.winit.schedule.core.model.JobID;
import com.winit.schedule.core.repository.constants.JobStatus;
import com.winit.schedule.remoting.annotation.NotNull;

public class JobEntity implements Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = -3079289278566608982L;

    @NotNull
    private JobID             jobId;

    @NotNull
    private String            jobName;

    @NotNull
    private long              createTime;

    /**
     * 提交的节点(用于区分不同分组的jobTracker)
     */
    private String            jobTrackerGroup;

    /**
     * 执行表达式 和 quartz 的一样 如果这个为空，表示立即执行的cronExpression
     */
    @NotNull
    private String            runStartTime;

    private String            runEndTime;

    /**
     * 启动后立即执行一次
     */
    private boolean           immediatelyRun;

    /**
     * 初始化，启动，暂停，删除等
     */
    private JobStatus         jobStatus;

    /**
     * 备注
     */
    private String            remark;

    private long              lastUpdateTime;

    public JobID getJobId() {
        return jobId;
    }

    public void setJobId(JobID jobId) {
        this.jobId = jobId;
    }

    public long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(long createTime) {
        this.createTime = createTime;
    }

    public String getJobTrackerGroup() {
        return jobTrackerGroup;
    }

    public void setJobTrackerGroup(String jobTrackerGroup) {
        this.jobTrackerGroup = jobTrackerGroup;
    }

    public String getRunStartTime() {
        return runStartTime;
    }

    public void setRunStartTime(String runStartTime) {
        this.runStartTime = runStartTime;
    }

    public String getRunEndTime() {
        return runEndTime;
    }

    public void setRunEndTime(String runEndTime) {
        this.runEndTime = runEndTime;
    }

    public JobStatus getJobStatus() {
        return jobStatus;
    }

    public void setJobStatus(JobStatus jobStatus) {
        this.jobStatus = jobStatus;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public long getLastUpdateTime() {
        return lastUpdateTime;
    }

    public void setLastUpdateTime(long lastUpdateTime) {
        this.lastUpdateTime = lastUpdateTime;
    }

    public String getJobName() {
        return jobName;
    }

    public void setJobName(String jobName) {
        this.jobName = jobName;
    }

    public boolean isImmediatelyRun() {
        return immediatelyRun;
    }

    public void setImmediatelyRun(boolean immediatelyRun) {
        this.immediatelyRun = immediatelyRun;
    }

}
